﻿<?php	
	if( isset($_POST['name'])
	 && isset($_POST['password'])
	 && isset($_POST['email'])
	 && isset($_POST['phone'])
	 && isset($_POST['birthday'])
	 && isset($_POST['sex']) )
	{
		$name = $_POST['name'];
		$password = $_POST['password'];
		$email = $_POST['email'];
		$phone = $_POST['phone'];
		$birthday = $_POST['birthday'];
		$sex = $_POST['sex'];
		
		include ("../DB/Connect.php");

		$query = "insert into userInfo(name,password,email,phone,birthday,sex) values ( '$name', '$password', '$email', '$phone', '$birthday', '$sex')";
		if( !$db -> runSql($query) )
			die($db -> error);
		else
			echo "ok";
	}
	else
	{
		die("kidding");
	}
?>